//
//  RootTabBarController.swift
//  SwfitDemo
//
//  Created by menchao on 2018/9/25.
//  Copyright © 2018年 Test. All rights reserved.
//

import UIKit

class RootTabBarController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()

        let firstVC = HomeVC()
        firstVC.title = "首页"
        let navi0 = UINavigationController(rootViewController:firstVC)
        navi0.tabBarItem.title = "首页"
        navi0.tabBarItem.image = UIImage (named:"sy")
        navi0.tabBarItem.selectedImage = UIImage(named:"sy1")
        
        let secondVC = MineVC()
        secondVC.title = "我的"
        let navi1 = UINavigationController(rootViewController:secondVC)
        navi1.tabBarItem.title = "我的"
        navi1.tabBarItem.image = UIImage (named:"wd")
        navi1.tabBarItem.selectedImage = UIImage(named:"wd1")
        
        
        tabBar.tintColor = UIColor.orange
        let tabArray = [navi0,navi1]
        self.viewControllers = tabArray
        
     }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
